<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title><g:layoutTitle default="Some Title"/></title>
    <link rel="icon" href="${createLinkTo(dir: "images", file: "favicon.ico")}" type="image/x-icon">
    <link rel="shortcut icon" href="${createLinkTo(dir: 'images', file: 'favicon.ico')}" type="image/x-icon"/>
    <asset:stylesheet src="homer/vendor/fontawesome/css/font-awesome.min.css"/>
    <asset:stylesheet src="homer/vendor/metisMenu/dist/metisMenu.min.css"/>
    <asset:stylesheet src="homer/vendor/bootstrap/dist/css/bootstrap.min.css"/>
    <asset:stylesheet src="homer/vendor/toastr/toastr.min.css"/>
    <asset:stylesheet src="homer/style.css"/>
    <asset:stylesheet src="homer/vendor/sweetalert/lib/sweet-alert.css"/>
    <asset:stylesheet src="homer/vendor/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css"/>
    <asset:stylesheet src="highlight/styles/atelier-seaside-light.css"/>
    <asset:stylesheet src="homer/vendor/select2-3.5.2/select2.min.css"/>
    <asset:stylesheet src="homer/vendor/select2-3.5.2/select2-bootstrap.css"/>
    <asset:stylesheet src="homer/vendor/ladda/ladda-themeless.min.css"/>
    <asset:stylesheet src="homer/vendor/datetimepicker/bootstrap-datetimepicker.min.css"/>
    <asset:stylesheet src="homer/vendor/summernote/summernote.css"/>
    <asset:stylesheet src="homer/vendor/bootstrap-touchspin/jquery.bootstrap-touchspin.min.css"/>
    <asset:javascript src="homer/vendor/jquery/dist/jquery.min.js"/>

    <g:layoutHead/>

    <style type="text/css">
    html {
        height: 100%;
    }

    body {
        font-family: "Microsoft YaHei", "Microsoft Sans Serif", "Helvetica Neue", Helvetica, Arial, "Hiragino Sans GB", sans-serif;
        background-color: #f1f3f6;
    }

    .table {
        margin-bottom: 0;
    }

    .pagination {
        margin: 0 auto;
        text-align: center;
    }

    .pagination a,
    .pagination .currentStep {
        color: #666;
        display: inline-block;
        margin: 0 0.1em;
        padding: 0.25em 0.7em;
        text-decoration: none;
        -moz-border-radius: 0.3em;
        -webkit-border-radius: 0.3em;
        border-radius: 0.3em;
    }

    .pagination a:hover, .pagination a:focus,
    .pagination .currentStep {
        background-color: #999;
        color: #fff;
        outline: none;
        text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8);
    }

    .panel-tools i {
        margin-right: 4px;
    }

    .errors {
        position: absolute;
        right: 10%;
        z-index: 10;
        top: 10px;
        color: #e74c3c;
        margin: 5px 0 0 0;
        font-weight: 400;
    }

    .errors li {
        padding: 10px 0;
    }

    .contact-stat span {
        font-size: 13px;
        color: #88898c;
        margin-bottom: 10px;
    }

    .contact-stat strong {
        font-size: 13px;
        word-wrap: break-word;
    }
    .tooltip{
        word-wrap: break-word;
    }

    .form-group span.cont {
        padding-top: 7px;
        margin-bottom: 0;
        display: block;
        font-size: 14px;
        color: #555;
    }

    pre {
        padding: 0px;
        border: none;
        background-color: transparent;
    }

    .hljs, .CodeMirror-code {
        font-size: 14px !important;
        font-family: Courier, Courier New;
    }
    .attchmentBody{
        padding: 0 !important;
        height: 160px;
    }
    .attchmentBody .imgBox {
        display: block;
        height: 130px;
        position: relative;
        box-sizing: border-box;
        padding: 5px 0;
    }

    .attchmentBody .imgBox img,.attchmentBody .imgBox .file-title {
        max-width: 100%;
        max-height: 100%;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    .attchmentBody .imgBox .file-title{
        width: 100%;
        padding: 0 15px;
        text-align: center;

    }

    .attchmentBody .imgBox .file-title:hover {
        text-decoration: underline;
    }
    .attchmentBody .description-edit {
        box-sizing: border-box;
        padding: 0 15px 10px 15px;
        display: block;
        width: 100%;
        height: 30px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;

    }

    #side-menu li a i {
        margin-right: 4px;
    }

    #side-menu li a {
        padding: 15px 20px 15px 10px;
    }

    .profile-picture i {
        margin-right: 10px;
    }

    #menu {
        background-color: #fff;
    }

    .new-dropdown {
        min-width: 100px;
    }

    .new-dropdown li i {
        margin-right: 6px;
    }

    .mobile-navbar .navbar-nav > li, .mobile-navbar .navbar-nav > li > a {
        height: 36px;
        line-height: 36px;
    }

    .mobile-navbar .navbar-nav > li > a {
        padding: 0 15px;
        font-size: 13px;
    }

    .dropdown-link {
        height: 56px !important;
        line-height: 56px !important;
        padding: 0 20px !important;
        display: block;
    }

    .hpanel {
        margin-bottom: 12px;
    }

    .select2-container .select2-choice {
        font-size: 14px;
        font-family: inherit;
    }

    .select2-search input {
        font-family: inherit;
    }

    .hr-line-dashed {
        margin: 15px 0;
    }

    .content {
        padding: 10px 40px 16px 40px;
    }

    .fixed-small-header .content {
        padding: 60px 40px;
    }

    .content.active {
        padding: 60px 40px 80px 40px !important;
    }

    .

    @media (max-width: 720px) {
        .content.active {
            padding: 140px 40px 80px 40px !important;
        }
    }

    #logo {
        padding: 18px;
    }

    .vertical-timeline-content h2 {
        font-size: 15px !important;
    }

    .vertical-timeline-content h2 span {
        font-size: 13px !important;
    }

    .modal textarea, .textarea, textarea {
        resize: vertical;
    }

    .form-group input[type='submit'] {
        width: 100%;
    }

    .form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control {
        background-color: transparent;
        opacity: 1;
        border: none;
        color: black;
    }

    .form-control[disabled], fieldset[disabled] .form-control {
        cursor: default;
    }

    .form-horizontal .control-label {
        padding-top: 8px;
    }

    .daily-b {
        cursor: pointer;
        border: 1px solid #e4e5e7 !important;
    }

    .alert {
        margin-bottom: 10px;
    }

    .comment-area {
        margin: 0;
        line-height: 22px;
        font-size: 13px;
        word-wrap: break-word;
        word-break: break-all;
    }

    .footer.bg-success {
        background-color: #dff0d8;
    }

    .href-link .page-scroll {
        font-weight: 600;
        font-size: 14px;
        padding: 0 10px;
        color: #455463;
    }

    .nav.navbar-nav li a {
        color: #666;
    }

    .href-link li.active .page-scroll {
        color: #5bc0de;
    }

    .href-link .nav li {
        float: left;
    }

    .href-link .navbar-nav > li > a:hover,
    .href-link .navbar-nav > li > a:focus {
        background-color: #fff;
        border-bottom: none;
        color: #5bc0de;
    }

    .text-comment {
        overflow: auto;
        max-height: 120px;
        line-height: 20px;
        margin-bottom: 0;
    }

    .panel-body.active {
        border: none;
    }

    .document-body {
        min-height: 200px;
        max-height: 500px;
        overflow: scroll;
    }

    .note-editable.panel-body {
        border-top: 1px solid #e4e5e7 !important;
    }

    .footBtn {
        display: inline-block;
        padding: 0 5px
    }

    .footBtn select {
        height: 30px;
    }

    table.text-center th {
        text-align: center;
    }

    .collateral .item p {
        padding: 10px 10px 0;
    }

    .fixed-small-header .small-header h2 .btn {
        margin-top: -2px;
    }

    .failReason {
        margin-left: 10px;
        font-weight: normal;
    }

    .productInterest .border-b:nth-child(n+7) {
        border-bottom: none;
    }

    .seach-group .col-md-3 {
        margin-bottom: 6px;
    }

    #s2id_actualLendingDate_year, #s2id_actualLendingDate_month, #s2id_actualLendingDate_day {
        width: 100px;
    }

    .checkbox input[type="checkbox"] {
        opacity: 1;
    }

    .label {
        padding: .2em .6em .2em;
    }

    .inlineBlock {
        display: inline-block;
    }

    .input-group[class*="col-"] {
        float: left;
        padding-right: 15px;
        padding-left: 15px;
    }

    .pl12 {
        padding-left: 12px;
    }



    </style>

</head>

<body class="fixed-navbar fixed-sidebar fixed-footer">

<div class="splash"><div class="color-line"></div>

    <div class="splash-title"><h1>Cake Store</h1>

        <div class="spinner"><div class="rect1"></div>

            <div class="rect2"></div>

            <div class="rect3"></div>

            <div class="rect4"></div>

            <div class="rect5"></div>
        </div>
    </div>
</div>

<div id="header">
    <div class="color-line">
    </div>

    <div id="logo" class="light-version">
        <span>

            <a href="/welcome">Cake Store</a>
        </span>
    </div>
    <nav role="navigation">
        <div class="header-link hide-menu"><i class="fa fa-bars"></i></div>

        <div class="small-logo">
            <span class="text-primary">Cake Store</span>
        </div>

        <div class="mobile-menu">
            <button type="button" class="navbar-toggle mobile-menu-toggle" data-toggle="collapse" style="margin-top:0"
                    data-target="#mobile-collapse">
                <sec:ifLoggedIn>
                    <asset:image src="defaultAvater.png" class="img-circle" alt="logo" width="32" height="32"/><b
                        class="caret"></b>
                </sec:ifLoggedIn>
            </button>

            <div class="collapse mobile-navbar" id="mobile-collapse">
                <ul class="nav navbar-nav new-dropdown">
                    <li>
                        <g:link controller="user" action="changePassword">
                            <i class="fa fa-gear"></i>修改口令
                        </g:link>
                    </li>
                    <li>
                        <g:link controller="logoff">
                            <i class="fa fa-sign-out"></i>退出
                        </g:link>
                    </li>
                </ul>
            </div>
        </div>

        <div class="navbar-right" id="header-right" style="margin-right: 20px;">

            <ul class="nav navbar-nav no-borders">
                <sec:ifLoggedIn>
                    <li class="dropdown">
                        <a class="dropdown-toggle dropdown-link" href="#" data-toggle="dropdown">
                            <asset:image src="defaultAvater.png" class="img-circle" alt="logo" width="32" height="32"/>
                            <span style="font-size: 16px"><sec:loggedInUserInfo field="username"/></span><b style="margin-top: 3px;" class="caret"></b>
                        </a>
                        <ul class="dropdown-menu new-dropdown hdropdown animated flipInX">
                            <li>
                                <g:link controller="user" action="changePassword">
                                    <i class="fa fa-lg fa-gear"></i>修改口令
                                </g:link>
                            </li>
                            <li>
                                <g:link controller="logoff">
                                    <i class="fa fa-lg fa-sign-out"></i>退出</g:link>
                            </li>
                        </ul>
                    </li>

                </sec:ifLoggedIn>
            </ul>
        </div>
    </nav>
</div>
<!-- Navigation -->
<sec:ifLoggedIn>
    <aside id="menu">
        <div id="navigation">
            <ul class="nav" id="side-menu">
                <sec:ifAnyGranted roles="ROLE_ADMINISTRATOR">
                    <li>
                        <a href="#">
                            <span class="nav-label ">
                                <i class="fa fa-lg fa-fw fa-book"></i>订单管理</span>
                            <span class="fa arrow"></span>
                        </a>
                        <ul class="nav nav-second-level">
                            <li>
                                <g:link controller="opportunity" action="index">
                                    全部订单
                                </g:link>
                            </li>
                            <li>
                                <g:link controller="opportunity" action="index" params="[stage: '未发货']">
                                    未发货订单
                                </g:link>
                            </li>
                            <li>
                                <g:link controller="opportunity" action="index" params="[stage: '已发货']">
                                    已发货订单
                                </g:link>
                            </li>
                            <li>
                                <g:link controller="opportunity" action="index" params="[stage: '已完成']">
                                    已完成订单
                                </g:link>
                            </li>
                            <li>
                                <g:link controller="opportunity" action="index" params="[status: 'Failed']">
                                    已失败订单
                                </g:link>
                            </li>
                        </ul>
                    </li>
                    <li>
                        <a href="#">
                            <span class="nav-label ">
                                <i class="fa fa-lg fa-fw fa-product-hunt"></i>产品管理</span>
                            <span class="fa arrow"></span>
                        </a>
                        <ul class="nav nav-second-level">
                            <li>
                                <g:link controller="product" action="index">
                                    产品列表
                                </g:link>
                            </li>
                            <li>
                                <g:link controller="productType" action="index">
                                    产品类型
                                </g:link>
                            </li>
                        </ul>
                    </li>
                    <li>
                        <g:link controller="contact" action="index">
                            <i class="fa fa-lg fa-fw fa-user"></i>客户管理
                        </g:link>
                    </li>
                    <li>
                        <a href="#">
                            <span class="nav-label">
                                <i class="fa fa-lg fa-fw fa-gear"></i>系统管理</span>
                            <span class="fa arrow"></span>
                        </a>
                        <ul class="nav nav-second-level">
                            <li>
                                <g:link controller="user" action="index">
                                    </i>用户管理
                                </g:link>
                            </li>
                            <li>
                                <g:link controller="role" action="index">
                                    角色
                                </g:link>
                            </li>
                        </ul>
                    </li>
                </sec:ifAnyGranted>
            </ul>
        </div>
    </aside>
</sec:ifLoggedIn>

<div id="wrapper">

    <g:layoutBody/>
</div>

<asset:javascript src="homer/vendor/jquery-ui/jquery-ui.min.js"/>
<asset:javascript src="homer/vendor/bootstrap/dist/js/bootstrap.min.js"/>
<asset:javascript src="homer/vendor/jquery-validation/jquery.validate.min.js"/>
<asset:javascript src="homer/vendor/metisMenu/dist/metisMenu.min.js"/>
<asset:javascript src="homer/vendor/sweetalert/lib/sweet-alert.min.js"/>
<asset:javascript src="homer/vendor/select2-3.5.2/select2.min.js"/>
<asset:javascript src="homer/vendor/select2-3.5.2/select2_locale_zh-CN.js"/>
<asset:javascript src="homer/vendor/iCheck/icheck.min.js"/>
<asset:javascript src="homer/vendor/ladda/spin.min.js"/>
<asset:javascript src="homer/vendor/ladda/ladda.min.js"/>
<asset:javascript src="homer/vendor/ladda/ladda.jquery.min.js"/>
<asset:javascript src="homer/homer.js"/>
<asset:javascript src="highlight.pack.js"/>
<asset:javascript src="homer/vendor/datetimepicker/bootstrap-datetimepicker.min.js"/>
<asset:javascript src="homer/vendor/datetimepicker/bootstrap-datetimepicker.zh-CN.js"/>
<asset:javascript src="homer/vendor/summernote/summernote.min.js"/>
<asset:javascript src="homer/vendor/bootstrap-touchspin/jquery.bootstrap-touchspin.min.js"/>
<asset:javascript src="homer/vendor/toastr/toastr.min.js"/>
<script>
    $(function () {



//        帮助文档
        var text = $("#document").val();
        $("#document-body").html(text);
//        折叠
        $(".collapsed .showhide").click(function () {
            $(this).parent().parent().toggleClass("hbuilt");
            $(this).parent().parent().parent().toggleClass("panel-collapse");
        });
        $("select").select2();
//        代码高亮
        hljs.initHighlightingOnLoad();

        //删除数据
        $(document).delegate(".deleteBtn", "click", function () {
            var currentForm = $(this).parent("form");
            swal({
                title: "您确认删除该数据吗?",
                type: "warning",
                showCancelButton: true,
                confirmButtonColor: "#DD6B55",
                cancelButtonText: "取消",
                confirmButtonText: "删除",
                closeOnConfirm: false,
                closeOnCancel: true

            },
            function (isConfirm) {
                if (isConfirm) {
                    currentForm.submit();
                }
            });
        });

        //确认操作
        $(document).delegate(".confirmBtn", "click", function () {
            var currentForm = $(this).parent("form");
            swal({
                title: "您确认进行该操作吗?",
                type: "warning",
                showCancelButton: true,
                confirmButtonColor: "#DD6B55",
                cancelButtonText: "取消",
                confirmButtonText: "确认",
                closeOnConfirm: false,
                closeOnCancel: true

            },
            function (isConfirm) {
                if (isConfirm) {
                    currentForm.submit();
                }
            });
        });

    });
    //    日期插件
    $('.form_datetime').datetimepicker({
        minView: "day", //选择日期后，不会再跳转去选择时分秒
        format: "yyyy-mm-dd hh:00:00", //选择日期后，文本框显示的日期格式
        language: 'zh-CN', //汉化
        autoclose: true //选择日期后自动关闭
    });
    $('.form_datetime3').datetimepicker({
        minView: "month", //选择日期后，不会再跳转去选择时分秒
        format: "yyyy-mm-dd", //选择日期后，文本框显示的日期格式
        language: 'zh-CN', //汉化
        autoclose: true //选择日期后自动关闭
    });
    $('.form_datetime2').datetimepicker({
        minView: "month", //选择日期后，不会再跳转去选择时分秒
        format: "yyyy-mm-dd 00:00:00", //选择日期后，文本框显示的日期格式
        language: 'zh-CN', //汉化
        autoclose: true //选择日期后自动关闭
    });
    $('.form_endtime').datetimepicker({
        minView: "month", //选择日期后，不会再跳转去选择时分秒
        format: "yyyy-mm-dd 23:59:59", //选择日期后，文本框显示的日期格式
        language: 'zh-CN', //汉化
        autoclose: true //选择日期后自动关闭
    });
    $('a.page-scroll').bind('click', function (event) {
        var link = $(this);
        $('html, body').stop().animate({
            scrollTop: $(link.attr('href')).offset().top - 115
        }, 500);
        event.preventDefault();
    });
    $('body').scrollspy({
        target: '#navbar-example',
        offset: 125
    });

    


    // 错误信息弹出框的参数配置
    toastr.options = {
        "closeButton": false,
        "debug": false,
        "newestOnTop": false,
        "progressBar": false,
        "positionClass": "toast-top-center",
        "preventDuplicates": false,
        "onclick": null,
        "showDuration": "300",
        "hideDuration": "1000",
        "timeOut": "3000",
        "extendedTimeOut": "1000",
        "showEasing": "swing",
        "hideEasing": "linear",
        "showMethod": "fadeIn",
        "hideMethod": "fadeOut"
    } ;

</script>

</body>
</html>
